<?php


namespace App\Model;


/**
 * App\Model\ShopCar
 *
 * @property int $id
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property int $goods_id 商品
 * @property int $goods_sku_id sku表id
 * @property int $num 商品数量
 * @property int $status 状态，1选中，2非选
 * @property int $user_id 用户id
 * @property int $seller_id 商户id
 * @property-read \App\Model\GoodsMode $goods
 * @property-read \App\Model\GoodsSku $goods_sku
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\ShopCar newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\ShopCar newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\ShopCar query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\ShopCar whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\ShopCar whereGoodsId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\ShopCar whereGoodsSkuId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\ShopCar whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\ShopCar whereNum($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\ShopCar whereSellerId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\ShopCar whereStatus($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\ShopCar whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\ShopCar whereUserId($value)
 * @mixin \Eloquent
 */
class ShopCar extends Base
{

    protected $table='shop_car';

    protected $fillable=['goods_id','goods_sku_id','num','status','user_id','seller_id'];


    function goods(){


        return $this->belongsTo(Goods::class,'goods_id','id');
    }


    function goods_sku(){


        return $this->belongsTo(GoodsSku::class,'goods_sku_id','id');
    }



}
